package utils;

import java.util.Date;
import java.util.Random;
import java.util.UUID;

public class RandomUUID {

    //进行随机生成文件名
    public static String RandomUUIDName(String FileName) {
        int fileID = FileName.lastIndexOf(".");//拿到文件之前的位置
        String fileNames = FileName.substring(fileID);
        String RandomUUID = UUID.randomUUID().toString().replace("-", "");
        String fileName = RandomUUID + fileNames;
        return fileName;
    }
    public static String getUUID(){
        return UUID.randomUUID().toString().replace("-", "");
    }
    public static String getOrderNo(){
       return DateUtil.toString(new Date(), "yyyyMMddHHmmss"+(int)Math.random()*100000);
    }

    public static void main(String[] args) {
        System.out.println(getOrderNo());
    }

}
